<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>三栏自适应布局</title>
    <style>
      html,
      body {
        height: 100%;
        padding: 0;
        margin: 0;
      }
      body {
        display: grid;
        grid-template-columns: repeat(3, auto);
        grid-template-rows: repeat(3, auto);
      }
    </style>
  </head>
  <body>
    <div class="left-box">1</div>
    <div class="right-box">2</div>
    <!-- 放最后，因为是分割100%剩余宽度 -->
    <div class="middle-box">3</div>
    <div class="middle-box">4</div>
    <div class="middle-box">5</div>
    <div class="middle-box">6</div>
    <div class="middle-box">7</div>
    <div class="middle-box">8</div>
    <div class="middle-box">9</div>
  </body>
</html>
